import Vue from 'vue'

import VueRouter from 'vue-router'

import First from '@/view/一级路由.vue'
import AA from '@/view/AA.vue'
import BB from '@/view/BB.vue'
import CC from '@/view/CC.vue'
import DD from '@/view/DD.vue'

Vue.use(VueRouter)

const router = new VueRouter({
  routes: [
    {
      path: '/',
      redirect: '/first',
    },
    {
      path: '/first',
      component: First,
      children: [
        {
          path: '/Aa',
          component: AA,
        },
        {
          path: '/Bb',
          component: BB,
        },
        {
          path: '/Cc',
          component: CC,
        },
        {
          path: '/Dd',
          component: DD,
        },
      ],
    },
  ],
})

export default router
